import java.io.*;

public class Demo12 {
    public static void main(String[] args) throws IOException {
        try(Reader reader=new FileReader("/Users/lcl/untitled7/src/test.txt")){
            while(true){
                char buf[]=new char[1024];
                int n=reader.read(buf);
                if(n==-1){
                    System.out.println("读到文件末尾");
                    break;
                }
                for(int i=0;i<n;i++){
                    System.out.println(buf[i]+",");
                }
                String s=new String();
                System.out.println(s);
            }
        }

    }
}
